package com.tacuati.ui;

import java.awt.Component;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;

public class ContentTreeIconRenderer extends DefaultTreeCellRenderer {
	private static final long serialVersionUID = 1L;

	public ContentTreeIconRenderer() {
	}
	
	public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
		super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
		ContentTreeNode node = (ContentTreeNode) value;
		setIcon(node.getIcon());
		setText(node.getNodeRenderer());
		return this;
	}
}